<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>dbcloud: src/java/org/dbcloud/mongodb/MongoCollection.java Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="csmake.v2.100.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">dbcloud
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_mongo_collection_8java_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">MongoCollection.java</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">package </span>org.dbcloud.mongodb;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">import</span> com.alibaba.fastjson.JSON;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keyword">import</span> com.csmake.Util;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keyword">import</span> com.mongodb.MongoClient;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keyword">import</span> com.mongodb.MongoClientOptions;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">import</span> com.mongodb.MongoCredential;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keyword">import</span> com.mongodb.MongoNamespace;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keyword">import</span> com.mongodb.ServerAddress;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="keyword">import</span> com.mongodb.annotations.ThreadSafe;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="keyword">import</span> com.mongodb.client.FindIterable;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="keyword">import</span> com.mongodb.client.ListIndexesIterable;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="keyword">import</span> com.mongodb.client.MongoCursor;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.CountOptions;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.FindOneAndDeleteOptions;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.FindOneAndReplaceOptions;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.FindOneAndUpdateOptions;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.IndexOptions;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.InsertManyOptions;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.InsertOneOptions;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.RenameCollectionOptions;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="keyword">import</span> com.mongodb.client.model.ReturnDocument;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keyword">import</span> com.mongodb.client.result.DeleteResult;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keyword">import</span> com.mongodb.client.result.UpdateResult;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="keyword">import</span> java.util.List;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="keyword">import</span> <a class="code" href="namespaceorg.html">org</a>.bson.Document;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keyword">import</span> <a class="code" href="namespaceorg.html">org</a>.bson.codecs.configuration.CodecRegistry;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="keyword">import</span> java.util.ArrayList;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keyword">import</span> java.util.concurrent.TimeUnit;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="comment">//https://github.com/csmake/webmongo.git</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment"></span>@ThreadSafe</div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html">  168</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html">MongoCollection</a> {</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keyword">private</span> com.mongodb.client.<a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a846851ba6d1d2c39a46be519d722f115">MongoCollection</a>&lt;Document&gt; proxy = null;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keyword">private</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a> mongoClient = null;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> csmakeInit(java.util.HashMap&lt;String, String&gt; args) <span class="keywordflow">throws</span> Exception {</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="keywordflow">try</span> {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            <span class="keywordflow">if</span> (mongoClient == null) {</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                String dbName = args.getOrDefault(<span class="stringliteral">&quot;db&quot;</span>, <span class="stringliteral">&quot;test&quot;</span>);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                String dbhost = args.getOrDefault(<span class="stringliteral">&quot;dbhost&quot;</span>, <span class="stringliteral">&quot;127.0.0.1&quot;</span>);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                String collection = args.getOrDefault(<span class="stringliteral">&quot;collection&quot;</span>, <span class="stringliteral">&quot;user&quot;</span>);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                <span class="keywordtype">int</span> dbport = Integer.valueOf(args.getOrDefault(<span class="stringliteral">&quot;dbport&quot;</span>, <span class="stringliteral">&quot;27017&quot;</span>));</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                MongoClientOptions msettings = MongoClientOptions.builder().codecRegistry(com.mongodb.MongoClient.getDefaultCodecRegistry()).build();</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                List&lt;MongoCredential&gt; credentials = <span class="keyword">new</span> ArrayList&lt;&gt;();</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                String userName = args.getOrDefault(<span class="stringliteral">&quot;user&quot;</span>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                String password = args.getOrDefault(<span class="stringliteral">&quot;password&quot;</span>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                <span class="keywordflow">if</span> (!userName.isEmpty() &amp;&amp; !password.isEmpty()) {</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                    credentials.add(MongoCredential.createCredential(userName, dbName, password.toCharArray()));</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                }</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                mongoClient = <span class="keyword">new</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a>(<span class="keyword">new</span> ServerAddress(dbhost, dbport), credentials, msettings);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                proxy = mongoClient.getDatabase(dbName).getCollection(collection);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            }</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        } <span class="keywordflow">catch</span> (Exception e) {</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            System.err.println(e.toString());</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        }</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    }</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a846851ba6d1d2c39a46be519d722f115">  201</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a846851ba6d1d2c39a46be519d722f115">MongoCollection</a>() {</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    }</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a1bfda7c100fe525b33ff984fb33aa7de">  210</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a1bfda7c100fe525b33ff984fb33aa7de">MongoCollection</a>(String db, String collection) {</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a> mongoClient = <span class="keyword">new</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a>(<span class="stringliteral">&quot;127.0.0.1&quot;</span>, 27017);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        proxy = mongoClient.getDatabase(db).getCollection(collection);</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    }</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab58bc79a81297e114b7910d933851b7f">  222</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab58bc79a81297e114b7910d933851b7f">MongoCollection</a>(String url, String db, String collection) {</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="keywordtype">int</span> port = 27017;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        String[] strs = url.split(<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        <span class="keywordflow">if</span> (strs.length &gt;= 2) {</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            port = Integer.valueOf(strs[1]);</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        }</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        String server = strs[0];</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        mongoClient = <span class="keyword">new</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a>(server, port);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        proxy = mongoClient.getDatabase(db).getCollection(collection);</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    }</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#acef4d2303697e996dc38affd79dad473">  242</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#acef4d2303697e996dc38affd79dad473">MongoCollection</a>(String db, String collection, String user, String password) {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        List&lt;MongoCredential&gt; credentialsList = <span class="keyword">new</span> ArrayList&lt;&gt;();</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        <span class="keywordflow">if</span> (!user.isEmpty() &amp;&amp; !password.isEmpty()) {</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            credentialsList.add(MongoCredential.createCredential(user, db, password.toCharArray()));</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        }</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        mongoClient = <span class="keyword">new</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a>(<span class="keyword">new</span> com.mongodb.ServerAddress(<span class="stringliteral">&quot;127.0.0.1&quot;</span>, 27017), credentialsList);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        proxy = mongoClient.getDatabase(db).getCollection(collection);</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a492a0ee36e39ea529c093d35bf7a6434">  261</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a492a0ee36e39ea529c093d35bf7a6434">MongoCollection</a>(String url, String db, String collection, String user, String password) {</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordtype">int</span> port = 27017;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        String[] strs = url.split(<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        <span class="keywordflow">if</span> (strs.length &gt;= 2) {</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;            port = Integer.valueOf(strs[1]);</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        }</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        String server = strs[0];</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        List&lt;MongoCredential&gt; credentialsList = <span class="keyword">new</span> ArrayList&lt;&gt;();</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordflow">if</span> (!user.isEmpty() &amp;&amp; !password.isEmpty()) {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            credentialsList.add(MongoCredential.createCredential(user, db, password.toCharArray()));</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        }</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        mongoClient = <span class="keyword">new</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">MongoClient</a>(<span class="keyword">new</span> com.mongodb.ServerAddress(server, port), credentialsList);</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        proxy = mongoClient.getDatabase(db).getCollection(collection);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    }</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a2f0e21db5bb3febaa541e133c7ef66e9">  281</a></span>&#160;    <span class="keyword">public</span> MongoNamespace <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a2f0e21db5bb3febaa541e133c7ef66e9">getNamespace</a>() {</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <span class="keywordflow">return</span> proxy.getNamespace();</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    }</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a8c2af3cf78bc03ccdaac0a951a53e79a">  290</a></span>&#160;    <span class="keyword">public</span> Class&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a8c2af3cf78bc03ccdaac0a951a53e79a">getDocumentClass</a>() {</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        <span class="keywordflow">return</span> proxy.getDocumentClass();</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    }</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a61344dfb0c2c8024b13958cb58f4b9ea">  299</a></span>&#160;    <span class="keyword">public</span> CodecRegistry <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a61344dfb0c2c8024b13958cb58f4b9ea">getCodecRegistry</a>() {</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="keywordflow">return</span> proxy.getCodecRegistry();</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    }</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a3dcdfa1f57844a0bdfbab94ce2aff5cf">  308</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">long</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a3dcdfa1f57844a0bdfbab94ce2aff5cf">count</a>() {</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;        <span class="keywordflow">return</span> proxy.count();</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    }</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#aceb03f6938db18c73f277faa59330c0c">  319</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">long</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#aceb03f6938db18c73f277faa59330c0c">count</a>(Document filter) {</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        <span class="keywordflow">return</span> proxy.count(toObjectId(filter));</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    }</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div><div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a277f5a10bd61376e08c1901694133c18">  331</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">long</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a277f5a10bd61376e08c1901694133c18">count</a>(Document filter, Document options) {</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        CountOptions op = <span class="keyword">new</span> CountOptions();</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;hint&quot;</span>)) {</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            Document hint = JSON.parseObject(options.get(<span class="stringliteral">&quot;hint&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;            op.hint(hint);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        }</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;maxTimeMS&quot;</span>)) {</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;            op.maxTime(Long.valueOf(options.get(<span class="stringliteral">&quot;maxTimeMS&quot;</span>).toString()), TimeUnit.MILLISECONDS);</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        }</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;limit&quot;</span>)) {</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;            op.limit(Integer.valueOf(options.get(<span class="stringliteral">&quot;limit&quot;</span>).toString()));</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        }</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;skip&quot;</span>)) {</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;            op.skip(Integer.valueOf(options.get(<span class="stringliteral">&quot;skip&quot;</span>).toString()));</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        }</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;hintString&quot;</span>)) {</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;            op.hintString(options.get(<span class="stringliteral">&quot;hintString&quot;</span>).toString());</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        }</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        <span class="keywordflow">return</span> proxy.count(toObjectId(filter), op);</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    }</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7920f36fe6cde9493c3f428f2a91ca90">  359</a></span>&#160;    <span class="keyword">public</span> ArrayList&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7920f36fe6cde9493c3f428f2a91ca90">find</a>() {</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        <span class="keywordflow">return</span> conv(proxy.find());</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    }</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a6e19633ee91a386a95c793dd2f107789">  370</a></span>&#160;    <span class="keyword">public</span> ArrayList&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a6e19633ee91a386a95c793dd2f107789">find</a>(Document filter) {</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        <span class="keywordflow">return</span> conv(proxy.find(toObjectId(filter)));</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    }</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a6b29e81c27b01b4489712f87d81ddff9">  382</a></span>&#160;    <span class="keyword">public</span> ArrayList&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a6b29e81c27b01b4489712f87d81ddff9">find</a>(Document filter, Document options) {</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        FindIterable&lt;Document&gt; res = proxy.find(toObjectId(filter));</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;projection&quot;</span>)) {</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;            Document projection = JSON.parseObject(options.get(<span class="stringliteral">&quot;projection&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;            res = res.projection(projection);</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;        }</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;sort&quot;</span>)) {</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            Document sort = JSON.parseObject(options.get(<span class="stringliteral">&quot;sort&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;            res = res.sort(sort);</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        }</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;skip&quot;</span>)) {</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;            res = res.skip(Integer.valueOf(options.get(<span class="stringliteral">&quot;skip&quot;</span>).toString()));</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        }</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;limit&quot;</span>)) {</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;            res = res.limit(Integer.valueOf(options.get(<span class="stringliteral">&quot;limit&quot;</span>).toString()));</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;        }</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        <span class="keywordflow">return</span> conv(res);</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    }</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a582640240d026ad5cac247662f3bec5f">  410</a></span>&#160;    <span class="keyword">public</span> ArrayList&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a582640240d026ad5cac247662f3bec5f">find</a>(Document filter, <span class="keywordtype">int</span> skip, <span class="keywordtype">int</span> limit) {</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;        <span class="keywordflow">return</span> conv(proxy.find(toObjectId(filter)).skip(skip).limit(limit));</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    }</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#aad9e90dcd78041d6690f44da4c90fcea">  424</a></span>&#160;    <span class="keyword">public</span> ArrayList&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#aad9e90dcd78041d6690f44da4c90fcea">find</a>(Document filter, Document options, <span class="keywordtype">int</span> skip, <span class="keywordtype">int</span> limit) {</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;        options.append(<span class="stringliteral">&quot;skip&quot;</span>, skip);</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;        options.append(<span class="stringliteral">&quot;limit&quot;</span>, limit);</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7920f36fe6cde9493c3f428f2a91ca90">find</a>(filter, options);</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;    }</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;</div><div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ace6908742cc86253248648e7914e5ba4">  443</a></span>&#160;    <span class="keyword">public</span> String <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ace6908742cc86253248648e7914e5ba4">insertOne</a>(Document document) {</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        proxy.insertOne(document);</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;        <span class="keywordflow">return</span> document.get(<span class="stringliteral">&quot;_id&quot;</span>).toString();</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    }</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;</div><div class="line"><a name="l00465"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab6d8b64ac1fe57e05e05dae723a98300">  465</a></span>&#160;    <span class="keyword">public</span> String <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab6d8b64ac1fe57e05e05dae723a98300">insertOne</a>(Document document, Document options) {</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;        InsertOneOptions ioo = <span class="keyword">new</span> InsertOneOptions();</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        ioo.bypassDocumentValidation(options.getBoolean(<span class="stringliteral">&quot;validation&quot;</span>, <span class="keyword">true</span>));</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;        proxy.insertOne(document, ioo);</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        <span class="keywordflow">return</span> document.get(<span class="stringliteral">&quot;_id&quot;</span>).toString();</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;    }</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;</div><div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab65adf01a3bb4cde1fc1a11ed0c1175f">  484</a></span>&#160;    <span class="keyword">public</span> List&lt;? extends String&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab65adf01a3bb4cde1fc1a11ed0c1175f">insertMany</a>(List&lt;? extends Document&gt; documents) {</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;        proxy.insertMany(documents);</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        ArrayList&lt;String&gt; ids = <span class="keyword">new</span> ArrayList();</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;        <span class="keywordtype">int</span> size = documents.size();</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) {</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            ids.add(documents.get(i).get(<span class="stringliteral">&quot;_id&quot;</span>).toString());</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;        }</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        <span class="keywordflow">return</span> ids;</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    }</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;</div><div class="line"><a name="l00507"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a70e847f10d93f3562cb8a393fbcd1356">  507</a></span>&#160;    <span class="keyword">public</span> List&lt;? extends String&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a70e847f10d93f3562cb8a393fbcd1356">insertMany</a>(List&lt;? extends Document&gt; documents, Document options) {</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;        <span class="keywordtype">boolean</span> ordered = options.getBoolean(<span class="stringliteral">&quot;ordered&quot;</span>, <span class="keyword">true</span>);</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;        <span class="keywordtype">boolean</span> validation = options.getBoolean(<span class="stringliteral">&quot;validation&quot;</span>, <span class="keyword">true</span>);</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;        InsertManyOptions imo = <span class="keyword">new</span> InsertManyOptions();</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        imo.ordered(ordered);</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;        imo.bypassDocumentValidation(validation);</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;        proxy.insertMany(documents, imo);</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;        ArrayList&lt;String&gt; ids = <span class="keyword">new</span> ArrayList();</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;        <span class="keywordtype">int</span> size = documents.size();</div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) {</div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;            ids.add(documents.get(i).get(<span class="stringliteral">&quot;_id&quot;</span>).toString());</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;        }</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;        <span class="keywordflow">return</span> ids;</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    }</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;</div><div class="line"><a name="l00535"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a77c09e10634134072f088158e3df7b7c">  535</a></span>&#160;    <span class="keyword">public</span> DeleteResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a77c09e10634134072f088158e3df7b7c">deleteOne</a>(Document filter) {</div><div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;        <span class="keywordflow">return</span> proxy.deleteOne(toObjectId(filter));</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    }</div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;</div><div class="line"><a name="l00552"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a9f4401a7fe9c3c6a4e40bf42aa33aacf">  552</a></span>&#160;    <span class="keyword">public</span> DeleteResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a9f4401a7fe9c3c6a4e40bf42aa33aacf">deleteMany</a>(Document filter) {</div><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;        <span class="keywordflow">return</span> proxy.deleteMany(toObjectId(filter));</div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    }</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae963c0f947163662e7e423f2bf0beb55">  571</a></span>&#160;    <span class="keyword">public</span> UpdateResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae963c0f947163662e7e423f2bf0beb55">replaceOne</a>(Document filter, Document replacement) {</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <span class="keywordflow">return</span> proxy.replaceOne(toObjectId(filter), replacement);</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    }</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae7a01525a63a7a36a15f223b626b4ee2">  591</a></span>&#160;    <span class="keyword">public</span> UpdateResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae7a01525a63a7a36a15f223b626b4ee2">replaceOne</a>(Document filter, Document replacement, Document options) {</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;        <span class="keywordflow">return</span> proxy.replaceOne(toObjectId(filter), replacement, toUpdateOptions(options));</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    }</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;</div><div class="line"><a name="l00612"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab7c23f71ad6a890481137116c064643d">  612</a></span>&#160;    <span class="keyword">public</span> UpdateResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab7c23f71ad6a890481137116c064643d">updateOne</a>(Document filter, Document update) {</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;        <span class="keywordflow">return</span> proxy.updateOne(toObjectId(filter), update);</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;    }</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;</div><div class="line"><a name="l00634"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab97cedc795005ea33bdfdb70ab72e46c">  634</a></span>&#160;    <span class="keyword">public</span> UpdateResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab97cedc795005ea33bdfdb70ab72e46c">updateOne</a>(Document filter, Document update, Document options) {</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;        <span class="keywordflow">return</span> proxy.updateOne(toObjectId(filter), update, toUpdateOptions(options));</div><div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;    }</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;</div><div class="line"><a name="l00655"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#af70d333cb96d2e392bf3e7a40f877905">  655</a></span>&#160;    <span class="keyword">public</span> UpdateResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#af70d333cb96d2e392bf3e7a40f877905">updateMany</a>(Document filter, Document update) {</div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;        <span class="keywordflow">return</span> proxy.updateMany(toObjectId(filter), update);</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;    }</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;</div><div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a72bd2e171d6a8e138ecab881f479ee39">  677</a></span>&#160;    <span class="keyword">public</span> UpdateResult <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a72bd2e171d6a8e138ecab881f479ee39">updateMany</a>(Document filter, Document update, Document options) {</div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;        <span class="keywordflow">return</span> proxy.updateMany(toObjectId(filter), update, toUpdateOptions(options));</div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;    }</div><div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;</div><div class="line"><a name="l00688"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a579e7b8ff5606d79a424fb9f8c782eed">  688</a></span>&#160;    <span class="keyword">public</span> Document <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a579e7b8ff5606d79a424fb9f8c782eed">findOneAndDelete</a>(Document filter) {</div><div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;        <span class="keywordflow">return</span> fromObjectId(proxy.findOneAndDelete(toObjectId(filter)));</div><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;    }</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;</div><div class="line"><a name="l00700"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5e227614c1369e7a1b33d0a241467a4d">  700</a></span>&#160;    <span class="keyword">public</span> Document <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5e227614c1369e7a1b33d0a241467a4d">findOneAndDelete</a>(Document filter, Document options) {</div><div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;        FindOneAndDeleteOptions foado = <span class="keyword">new</span> FindOneAndDeleteOptions();</div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;sort&quot;</span>)) {</div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;            Document sort = JSON.parseObject(options.get(<span class="stringliteral">&quot;sort&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;            foado.sort(sort);</div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;        }</div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;projection&quot;</span>)) {</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;            Document projection = JSON.parseObject(options.get(<span class="stringliteral">&quot;projection&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;            foado.projection(projection);</div><div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;        }</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;maxTimeMS&quot;</span>)) {</div><div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;            foado.maxTime(Long.valueOf(options.get(<span class="stringliteral">&quot;maxTimeMS&quot;</span>).toString()), TimeUnit.MILLISECONDS);</div><div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;        }</div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;        <span class="keywordflow">return</span> fromObjectId(proxy.findOneAndDelete(toObjectId(filter), foado));</div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;    }</div><div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;</div><div class="line"><a name="l00726"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a416e561769737fda3367ac25040dd612">  726</a></span>&#160;    <span class="keyword">public</span> Document <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a416e561769737fda3367ac25040dd612">findOneAndReplace</a>(Document filter, Document replacement) {</div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;        <span class="keywordflow">return</span> fromObjectId(proxy.findOneAndReplace(toObjectId(filter), replacement));</div><div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;    }</div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;</div><div class="line"><a name="l00741"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a11fbbe695ab03ffa33bf49fd96082945">  741</a></span>&#160;    <span class="keyword">public</span> Document <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a11fbbe695ab03ffa33bf49fd96082945">findOneAndReplace</a>(Document filter, Document replacement, Document options) {</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;        FindOneAndReplaceOptions foaro = <span class="keyword">new</span> FindOneAndReplaceOptions();</div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;</div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;sort&quot;</span>)) {</div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;            Document sort = JSON.parseObject(options.get(<span class="stringliteral">&quot;sort&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;            foaro.sort(sort);</div><div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;        }</div><div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;projection&quot;</span>)) {</div><div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;            Document projection = JSON.parseObject(options.get(<span class="stringliteral">&quot;projection&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;            foaro.projection(projection);</div><div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;        }</div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;maxTimeMS&quot;</span>)) {</div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;            foaro.maxTime(Long.valueOf(options.get(<span class="stringliteral">&quot;maxTimeMS&quot;</span>).toString()), TimeUnit.MILLISECONDS);</div><div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        }</div><div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        foaro.bypassDocumentValidation(options.getBoolean(<span class="stringliteral">&quot;validation&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        foaro.upsert(options.getBoolean(<span class="stringliteral">&quot;upsert&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;        <span class="keywordtype">boolean</span> returnNew = options.getBoolean(<span class="stringliteral">&quot;returnNew&quot;</span>, <span class="keyword">false</span>);</div><div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;        foaro.returnDocument(returnNew ? com.mongodb.client.model.ReturnDocument.AFTER : com.mongodb.client.model.ReturnDocument.BEFORE);</div><div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;        Document o = fromObjectId(proxy.findOneAndReplace(toObjectId(filter), replacement, foaro));</div><div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;        <span class="keywordflow">return</span> returnNew ? replacement : o;</div><div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;    }</div><div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;</div><div class="line"><a name="l00773"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a930e0886d2a077f9bf50de4393dda474">  773</a></span>&#160;    <span class="keyword">public</span> Document <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a930e0886d2a077f9bf50de4393dda474">findOneAndUpdate</a>(Document filter, Document update) {</div><div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;        <span class="keywordflow">return</span> fromObjectId(proxy.findOneAndUpdate(toObjectId(filter), update));</div><div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;    }</div><div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;</div><div class="line"><a name="l00790"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae248d63161583e67f6146d837b44375e">  790</a></span>&#160;    <span class="keyword">public</span> Document <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae248d63161583e67f6146d837b44375e">findOneAndUpdate</a>(Document filter, Document update, Document options) {</div><div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;        FindOneAndUpdateOptions foauo = <span class="keyword">new</span> FindOneAndUpdateOptions();</div><div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;</div><div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;sort&quot;</span>)) {</div><div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;            Document sort = JSON.parseObject(options.get(<span class="stringliteral">&quot;sort&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;            foauo.sort(sort);</div><div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;        }</div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;projection&quot;</span>)) {</div><div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;            Document projection = JSON.parseObject(options.get(<span class="stringliteral">&quot;projection&quot;</span>).toString(), Document.class);</div><div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;            foauo.projection(projection);</div><div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;        }</div><div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;maxTimeMS&quot;</span>)) {</div><div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;            foauo.maxTime(Long.valueOf(options.get(<span class="stringliteral">&quot;maxTimeMS&quot;</span>).toString()), TimeUnit.MILLISECONDS);</div><div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;        }</div><div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;        foauo.bypassDocumentValidation(options.getBoolean(<span class="stringliteral">&quot;validation&quot;</span>, <span class="keyword">true</span>));</div><div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;        foauo.upsert(options.getBoolean(<span class="stringliteral">&quot;upsert&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;        foauo.returnDocument(options.getBoolean(<span class="stringliteral">&quot;returnNew&quot;</span>, <span class="keyword">false</span>) ? com.mongodb.client.model.ReturnDocument.AFTER : com.mongodb.client.model.ReturnDocument.BEFORE);</div><div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;        <span class="keywordflow">return</span> fromObjectId(proxy.findOneAndUpdate(toObjectId(filter), update, foauo));</div><div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;    }</div><div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;</div><div class="line"><a name="l00815"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a695d56304266d8d5cca11389128ea670">  815</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a695d56304266d8d5cca11389128ea670">drop</a>() {</div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;        proxy.drop();</div><div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;    }</div><div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;</div><div class="line"><a name="l00823"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a4ddc3799b301f1028d056631b922ed86">  823</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a4ddc3799b301f1028d056631b922ed86">close</a>() {</div><div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;        mongoClient.close();</div><div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;    }</div><div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;</div><div class="line"><a name="l00834"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a83c92798071552e8c968b8c3e579748d">  834</a></span>&#160;    <span class="keyword">public</span> String <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a83c92798071552e8c968b8c3e579748d">createIndex</a>(Document keys) {</div><div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;        <span class="keywordflow">return</span> proxy.createIndex(keys);</div><div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;    }</div><div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;</div><div class="line"><a name="l00846"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a8760e7a2803c020ec032152ed90e1444">  846</a></span>&#160;    <span class="keyword">public</span> String <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a8760e7a2803c020ec032152ed90e1444">createIndex</a>(Document keys, Document options) {</div><div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;        IndexOptions io = <span class="keyword">new</span> IndexOptions();</div><div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;background&quot;</span>)) {</div><div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;            io.background(options.getBoolean(<span class="stringliteral">&quot;background&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;        }</div><div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;unique&quot;</span>)) {</div><div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;            io.unique(options.getBoolean(<span class="stringliteral">&quot;unique&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;        }</div><div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;sparse&quot;</span>)) {</div><div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;            io.sparse(options.getBoolean(<span class="stringliteral">&quot;sparse&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;        }</div><div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;name&quot;</span>)) {</div><div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;            io.name(options.get(<span class="stringliteral">&quot;name&quot;</span>).toString());</div><div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;        }</div><div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;expireAfterSeconds&quot;</span>)) {</div><div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;            io.expireAfter(Long.valueOf(options.get(<span class="stringliteral">&quot;expireAfterSeconds&quot;</span>).toString()), TimeUnit.SECONDS);</div><div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;        }</div><div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;version&quot;</span>)) {</div><div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;            io.version(Integer.valueOf(options.get(<span class="stringliteral">&quot;expireAfterSeconds&quot;</span>).toString()));</div><div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;        }</div><div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;weights&quot;</span>)) {</div><div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;            io.weights(JSON.parseObject(options.get(<span class="stringliteral">&quot;weights&quot;</span>).toString(), Document.class));</div><div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;        }</div><div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;storageEngine&quot;</span>)) {</div><div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;            io.storageEngine(JSON.parseObject(options.get(<span class="stringliteral">&quot;storageEngine&quot;</span>).toString(), Document.class));</div><div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;        }</div><div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;partialFilterExpression&quot;</span>)) {</div><div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;            io.partialFilterExpression(JSON.parseObject(options.get(<span class="stringliteral">&quot;partialFilterExpression&quot;</span>).toString(), Document.class));</div><div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;        }</div><div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;weights&quot;</span>)) {</div><div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;            io.weights(JSON.parseObject(options.get(<span class="stringliteral">&quot;weights&quot;</span>).toString(), Document.class));</div><div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;        }</div><div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;bits&quot;</span>)) {</div><div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;            io.bits(Integer.valueOf(options.get(<span class="stringliteral">&quot;bits&quot;</span>).toString()));</div><div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;        }</div><div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;sphereVersion&quot;</span>)) {</div><div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;            io.sphereVersion(Integer.valueOf(options.get(<span class="stringliteral">&quot;sphereVersion&quot;</span>).toString()));</div><div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;        }</div><div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;textVersion&quot;</span>)) {</div><div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;            io.textVersion(Integer.valueOf(options.get(<span class="stringliteral">&quot;textVersion&quot;</span>).toString()));</div><div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;        }</div><div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;min&quot;</span>)) {</div><div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;            io.min(Double.valueOf(options.get(<span class="stringliteral">&quot;min&quot;</span>).toString()));</div><div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;        }</div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;max&quot;</span>)) {</div><div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;            io.max(Double.valueOf(options.get(<span class="stringliteral">&quot;max&quot;</span>).toString()));</div><div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;        }</div><div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;bucketSize&quot;</span>)) {</div><div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;            io.bucketSize(Double.valueOf(options.get(<span class="stringliteral">&quot;bucketSize&quot;</span>).toString()));</div><div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;        }</div><div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;defaultLanguage&quot;</span>)) {</div><div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;            io.defaultLanguage(options.get(<span class="stringliteral">&quot;defaultLanguage&quot;</span>).toString());</div><div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;        }</div><div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;        <span class="keywordflow">if</span> (options.containsKey(<span class="stringliteral">&quot;languageOverride&quot;</span>)) {</div><div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;            io.languageOverride(options.get(<span class="stringliteral">&quot;languageOverride&quot;</span>).toString());</div><div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;        }</div><div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160;        <span class="keywordflow">return</span> proxy.createIndex(keys, io);</div><div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;    }</div><div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160;</div><div class="line"><a name="l00912"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a482791d8b4b70357f1be77e4eb497b8b">  912</a></span>&#160;    <span class="keyword">public</span> List&lt;String&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a482791d8b4b70357f1be77e4eb497b8b">createIndexes</a>(List&lt;Document&gt; indexes) {</div><div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;        ArrayList&lt;String&gt; rets = <span class="keyword">new</span> ArrayList();</div><div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;        <span class="keywordflow">for</span> (Document document : indexes) {</div><div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;            rets.add(<a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a83c92798071552e8c968b8c3e579748d">createIndex</a>(JSON.parseObject(document.get(<span class="stringliteral">&quot;keys&quot;</span>).toString(), Document.class), JSON.parseObject(document.get(<span class="stringliteral">&quot;options&quot;</span>).toString(), Document.class)));</div><div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;        }</div><div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;        <span class="keywordflow">return</span> rets;</div><div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;    }</div><div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;</div><div class="line"><a name="l00926"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a103bda32a8e24b95294da0641e81417f">  926</a></span>&#160;    <span class="keyword">public</span> ListIndexesIterable&lt;Document&gt; <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a103bda32a8e24b95294da0641e81417f">listIndexes</a>() {</div><div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;        <span class="keywordflow">return</span> proxy.listIndexes();</div><div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;    }</div><div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;</div><div class="line"><a name="l00936"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a241216a60637b42131e76277c478c293">  936</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a241216a60637b42131e76277c478c293">dropIndex</a>(String keys) {</div><div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;        proxy.dropIndex(keys);</div><div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;    }</div><div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;</div><div class="line"><a name="l00946"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#afb8606934c2234be092ff9d14cff8492">  946</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#afb8606934c2234be092ff9d14cff8492">dropIndex</a>(Document keys) {</div><div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;        proxy.dropIndex(keys);</div><div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;    }</div><div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;</div><div class="line"><a name="l00955"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a2edf2713f3c672345cd270a57eb51240">  955</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a2edf2713f3c672345cd270a57eb51240">dropIndexes</a>() {</div><div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;        proxy.dropIndexes();</div><div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;    }</div><div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;</div><div class="line"><a name="l00970"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5dbfb3d6fa8b5a5cb2eb499c500c99ec">  970</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5dbfb3d6fa8b5a5cb2eb499c500c99ec">renameCollection</a>(Document newCollectionNamespace) {</div><div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;        this.<a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5dbfb3d6fa8b5a5cb2eb499c500c99ec">renameCollection</a>(newCollectionNamespace, null);</div><div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;    }</div><div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;</div><div class="line"><a name="l00985"></a><span class="lineno"><a class="line" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7191c56a99d940e0820b62dd5f27948a">  985</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7191c56a99d940e0820b62dd5f27948a">renameCollection</a>(Document newCollectionNamespace, Document options) {</div><div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;        MongoNamespace mn = null;</div><div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;        String fullName = newCollectionNamespace.getString(<span class="stringliteral">&quot;fullName&quot;</span>);</div><div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;        <span class="keywordflow">if</span> (fullName != null &amp;&amp; !fullName.isEmpty()) {</div><div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;            mn = <span class="keyword">new</span> MongoNamespace(fullName);</div><div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;            String databaseName = newCollectionNamespace.getString(<span class="stringliteral">&quot;databaseName&quot;</span>);</div><div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;            String collectionName = newCollectionNamespace.getString(<span class="stringliteral">&quot;collectionName&quot;</span>);</div><div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;</div><div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;            <span class="keywordflow">if</span> (databaseName == null || databaseName.isEmpty()) {</div><div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;                databaseName = proxy.getNamespace().getDatabaseName();</div><div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;            }</div><div class="line"><a name="l00997"></a><span class="lineno">  997</span>&#160;            <span class="keywordflow">if</span> (collectionName == null || collectionName.isEmpty()) {</div><div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;                collectionName = proxy.getNamespace().getCollectionName();</div><div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;            }</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;            mn = <span class="keyword">new</span> MongoNamespace(databaseName, collectionName);</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;        }</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;        <span class="keywordflow">if</span> (mn != null) {</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;            <span class="keywordflow">if</span> (options != null) {</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;                RenameCollectionOptions rco = <span class="keyword">new</span> RenameCollectionOptions();</div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;                rco.dropTarget(options.getBoolean(<span class="stringliteral">&quot;dropTarget&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;                proxy.renameCollection(mn, rco);</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;                proxy.renameCollection(mn);</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;            }</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;        }</div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;    }</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;    <span class="keyword">private</span> Document fromObjectId(Document document) {</div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;        <span class="keywordflow">if</span> (document != null &amp;&amp; document.containsKey(<span class="stringliteral">&quot;_id&quot;</span>)) {</div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;            Object <span class="keywordtype">id</span> = document.get(<span class="stringliteral">&quot;_id&quot;</span>);</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;            document.replace(<span class="stringliteral">&quot;_id&quot;</span>, <span class="keywordtype">id</span>.toString());</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;        }</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;        <span class="keywordflow">return</span> document;</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;    }</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;    <span class="keyword">private</span> Document toObjectId(Document document) {</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;        String _id = document.getString(<span class="stringliteral">&quot;_id&quot;</span>);</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;        <span class="keywordflow">if</span> (_id != null &amp;&amp; _id.length() == 24) {</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;            document.replace(<span class="stringliteral">&quot;_id&quot;</span>, <span class="keyword">new</span> <a class="code" href="namespaceorg.html">org</a>.bson.types.ObjectId(_id));</div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;        }</div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;        <span class="keywordflow">return</span> document;</div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;    }</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;</div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;    <span class="keyword">private</span> com.mongodb.client.model.UpdateOptions toUpdateOptions(Document options) {</div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;        com.mongodb.client.model.UpdateOptions uo = <span class="keyword">new</span> com.mongodb.client.model.UpdateOptions();</div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;        uo.bypassDocumentValidation(options.getBoolean(<span class="stringliteral">&quot;validation&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;        uo.upsert(options.getBoolean(<span class="stringliteral">&quot;upsert&quot;</span>, <span class="keyword">false</span>));</div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;        <span class="keywordflow">return</span> uo;</div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;    }</div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;</div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;    <span class="keyword">private</span> ArrayList&lt;Document&gt; conv(FindIterable&lt;Document&gt; cursors) {</div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;        ArrayList&lt;Document&gt; list = <span class="keyword">new</span> ArrayList&lt;&gt;();</div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;        <span class="keywordflow">try</span> (MongoCursor&lt;Document&gt; ret = cursors.iterator()) {</div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;            <span class="keywordflow">while</span> (ret.hasNext()) {</div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;                Document document = ret.next();</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;                Object <span class="keywordtype">id</span> = document.get(<span class="stringliteral">&quot;_id&quot;</span>);</div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;                <span class="keywordflow">if</span> (<span class="keywordtype">id</span> != null) {</div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;                    document.replace(<span class="stringliteral">&quot;_id&quot;</span>, <span class="keywordtype">id</span>.toString());</div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;                }</div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;                list.add(document);</div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;            }</div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;        }</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;        <span class="keywordflow">return</span> list;</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;    }</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;}</div><div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a582640240d026ad5cac247662f3bec5f"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a582640240d026ad5cac247662f3bec5f">org.dbcloud.mongodb.MongoCollection.find</a></div><div class="ttdeci">ArrayList&lt; Document &gt; find(Document filter, int skip, int limit)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00410">MongoCollection.java:410</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_aceb03f6938db18c73f277faa59330c0c"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#aceb03f6938db18c73f277faa59330c0c">org.dbcloud.mongodb.MongoCollection.count</a></div><div class="ttdeci">long count(Document filter)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00319">MongoCollection.java:319</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a70e847f10d93f3562cb8a393fbcd1356"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a70e847f10d93f3562cb8a393fbcd1356">org.dbcloud.mongodb.MongoCollection.insertMany</a></div><div class="ttdeci">List&lt;? extends String &gt; insertMany(List&lt;? extends Document &gt; documents, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00507">MongoCollection.java:507</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a83c92798071552e8c968b8c3e579748d"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a83c92798071552e8c968b8c3e579748d">org.dbcloud.mongodb.MongoCollection.createIndex</a></div><div class="ttdeci">String createIndex(Document keys)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00834">MongoCollection.java:834</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ae248d63161583e67f6146d837b44375e"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae248d63161583e67f6146d837b44375e">org.dbcloud.mongodb.MongoCollection.findOneAndUpdate</a></div><div class="ttdeci">Document findOneAndUpdate(Document filter, Document update, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00790">MongoCollection.java:790</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ae963c0f947163662e7e423f2bf0beb55"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae963c0f947163662e7e423f2bf0beb55">org.dbcloud.mongodb.MongoCollection.replaceOne</a></div><div class="ttdeci">UpdateResult replaceOne(Document filter, Document replacement)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00571">MongoCollection.java:571</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a8c2af3cf78bc03ccdaac0a951a53e79a"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a8c2af3cf78bc03ccdaac0a951a53e79a">org.dbcloud.mongodb.MongoCollection.getDocumentClass</a></div><div class="ttdeci">Class&lt; Document &gt; getDocumentClass()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00290">MongoCollection.java:290</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a7920f36fe6cde9493c3f428f2a91ca90"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7920f36fe6cde9493c3f428f2a91ca90">org.dbcloud.mongodb.MongoCollection.find</a></div><div class="ttdeci">ArrayList&lt; Document &gt; find()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00359">MongoCollection.java:359</a></div></div>
<div class="ttc" id="namespaceorg_html"><div class="ttname"><a href="namespaceorg.html">org</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ab65adf01a3bb4cde1fc1a11ed0c1175f"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab65adf01a3bb4cde1fc1a11ed0c1175f">org.dbcloud.mongodb.MongoCollection.insertMany</a></div><div class="ttdeci">List&lt;? extends String &gt; insertMany(List&lt;? extends Document &gt; documents)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00484">MongoCollection.java:484</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a241216a60637b42131e76277c478c293"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a241216a60637b42131e76277c478c293">org.dbcloud.mongodb.MongoCollection.dropIndex</a></div><div class="ttdeci">void dropIndex(String keys)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00936">MongoCollection.java:936</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ace6908742cc86253248648e7914e5ba4"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ace6908742cc86253248648e7914e5ba4">org.dbcloud.mongodb.MongoCollection.insertOne</a></div><div class="ttdeci">String insertOne(Document document)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00443">MongoCollection.java:443</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a6b29e81c27b01b4489712f87d81ddff9"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a6b29e81c27b01b4489712f87d81ddff9">org.dbcloud.mongodb.MongoCollection.find</a></div><div class="ttdeci">ArrayList&lt; Document &gt; find(Document filter, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00382">MongoCollection.java:382</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a5dbfb3d6fa8b5a5cb2eb499c500c99ec"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5dbfb3d6fa8b5a5cb2eb499c500c99ec">org.dbcloud.mongodb.MongoCollection.renameCollection</a></div><div class="ttdeci">void renameCollection(Document newCollectionNamespace)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00970">MongoCollection.java:970</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a930e0886d2a077f9bf50de4393dda474"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a930e0886d2a077f9bf50de4393dda474">org.dbcloud.mongodb.MongoCollection.findOneAndUpdate</a></div><div class="ttdeci">Document findOneAndUpdate(Document filter, Document update)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00773">MongoCollection.java:773</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a416e561769737fda3367ac25040dd612"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a416e561769737fda3367ac25040dd612">org.dbcloud.mongodb.MongoCollection.findOneAndReplace</a></div><div class="ttdeci">Document findOneAndReplace(Document filter, Document replacement)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00726">MongoCollection.java:726</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_af70d333cb96d2e392bf3e7a40f877905"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#af70d333cb96d2e392bf3e7a40f877905">org.dbcloud.mongodb.MongoCollection.updateMany</a></div><div class="ttdeci">UpdateResult updateMany(Document filter, Document update)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00655">MongoCollection.java:655</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a3dcdfa1f57844a0bdfbab94ce2aff5cf"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a3dcdfa1f57844a0bdfbab94ce2aff5cf">org.dbcloud.mongodb.MongoCollection.count</a></div><div class="ttdeci">long count()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00308">MongoCollection.java:308</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a61344dfb0c2c8024b13958cb58f4b9ea"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a61344dfb0c2c8024b13958cb58f4b9ea">org.dbcloud.mongodb.MongoCollection.getCodecRegistry</a></div><div class="ttdeci">CodecRegistry getCodecRegistry()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00299">MongoCollection.java:299</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a695d56304266d8d5cca11389128ea670"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a695d56304266d8d5cca11389128ea670">org.dbcloud.mongodb.MongoCollection.drop</a></div><div class="ttdeci">void drop()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00815">MongoCollection.java:815</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a7191c56a99d940e0820b62dd5f27948a"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a7191c56a99d940e0820b62dd5f27948a">org.dbcloud.mongodb.MongoCollection.renameCollection</a></div><div class="ttdeci">void renameCollection(Document newCollectionNamespace, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00985">MongoCollection.java:985</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a277f5a10bd61376e08c1901694133c18"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a277f5a10bd61376e08c1901694133c18">org.dbcloud.mongodb.MongoCollection.count</a></div><div class="ttdeci">long count(Document filter, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00331">MongoCollection.java:331</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ab58bc79a81297e114b7910d933851b7f"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab58bc79a81297e114b7910d933851b7f">org.dbcloud.mongodb.MongoCollection.MongoCollection</a></div><div class="ttdeci">MongoCollection(String url, String db, String collection)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00222">MongoCollection.java:222</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a4ddc3799b301f1028d056631b922ed86"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a4ddc3799b301f1028d056631b922ed86">org.dbcloud.mongodb.MongoCollection.close</a></div><div class="ttdeci">void close()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00823">MongoCollection.java:823</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a9f4401a7fe9c3c6a4e40bf42aa33aacf"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a9f4401a7fe9c3c6a4e40bf42aa33aacf">org.dbcloud.mongodb.MongoCollection.deleteMany</a></div><div class="ttdeci">DeleteResult deleteMany(Document filter)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00552">MongoCollection.java:552</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a103bda32a8e24b95294da0641e81417f"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a103bda32a8e24b95294da0641e81417f">org.dbcloud.mongodb.MongoCollection.listIndexes</a></div><div class="ttdeci">ListIndexesIterable&lt; Document &gt; listIndexes()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00926">MongoCollection.java:926</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html">org.dbcloud.mongodb.MongoCollection</a></div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00168">MongoCollection.java:168</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a482791d8b4b70357f1be77e4eb497b8b"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a482791d8b4b70357f1be77e4eb497b8b">org.dbcloud.mongodb.MongoCollection.createIndexes</a></div><div class="ttdeci">List&lt; String &gt; createIndexes(List&lt; Document &gt; indexes)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00912">MongoCollection.java:912</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a72bd2e171d6a8e138ecab881f479ee39"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a72bd2e171d6a8e138ecab881f479ee39">org.dbcloud.mongodb.MongoCollection.updateMany</a></div><div class="ttdeci">UpdateResult updateMany(Document filter, Document update, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00677">MongoCollection.java:677</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ab97cedc795005ea33bdfdb70ab72e46c"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab97cedc795005ea33bdfdb70ab72e46c">org.dbcloud.mongodb.MongoCollection.updateOne</a></div><div class="ttdeci">UpdateResult updateOne(Document filter, Document update, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00634">MongoCollection.java:634</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ae7a01525a63a7a36a15f223b626b4ee2"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ae7a01525a63a7a36a15f223b626b4ee2">org.dbcloud.mongodb.MongoCollection.replaceOne</a></div><div class="ttdeci">UpdateResult replaceOne(Document filter, Document replacement, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00591">MongoCollection.java:591</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client_html"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_client.html">org.dbcloud.mongodb.MongoClient</a></div><div class="ttdef"><b>Definition:</b> <a href="_mongo_client_8java_source.html#l00019">MongoClient.java:19</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ab7c23f71ad6a890481137116c064643d"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab7c23f71ad6a890481137116c064643d">org.dbcloud.mongodb.MongoCollection.updateOne</a></div><div class="ttdeci">UpdateResult updateOne(Document filter, Document update)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00612">MongoCollection.java:612</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a8760e7a2803c020ec032152ed90e1444"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a8760e7a2803c020ec032152ed90e1444">org.dbcloud.mongodb.MongoCollection.createIndex</a></div><div class="ttdeci">String createIndex(Document keys, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00846">MongoCollection.java:846</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a846851ba6d1d2c39a46be519d722f115"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a846851ba6d1d2c39a46be519d722f115">org.dbcloud.mongodb.MongoCollection.MongoCollection</a></div><div class="ttdeci">MongoCollection()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00201">MongoCollection.java:201</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a5e227614c1369e7a1b33d0a241467a4d"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a5e227614c1369e7a1b33d0a241467a4d">org.dbcloud.mongodb.MongoCollection.findOneAndDelete</a></div><div class="ttdeci">Document findOneAndDelete(Document filter, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00700">MongoCollection.java:700</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a2edf2713f3c672345cd270a57eb51240"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a2edf2713f3c672345cd270a57eb51240">org.dbcloud.mongodb.MongoCollection.dropIndexes</a></div><div class="ttdeci">void dropIndexes()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00955">MongoCollection.java:955</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a1bfda7c100fe525b33ff984fb33aa7de"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a1bfda7c100fe525b33ff984fb33aa7de">org.dbcloud.mongodb.MongoCollection.MongoCollection</a></div><div class="ttdeci">MongoCollection(String db, String collection)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00210">MongoCollection.java:210</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a492a0ee36e39ea529c093d35bf7a6434"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a492a0ee36e39ea529c093d35bf7a6434">org.dbcloud.mongodb.MongoCollection.MongoCollection</a></div><div class="ttdeci">MongoCollection(String url, String db, String collection, String user, String password)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00261">MongoCollection.java:261</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_afb8606934c2234be092ff9d14cff8492"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#afb8606934c2234be092ff9d14cff8492">org.dbcloud.mongodb.MongoCollection.dropIndex</a></div><div class="ttdeci">void dropIndex(Document keys)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00946">MongoCollection.java:946</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a2f0e21db5bb3febaa541e133c7ef66e9"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a2f0e21db5bb3febaa541e133c7ef66e9">org.dbcloud.mongodb.MongoCollection.getNamespace</a></div><div class="ttdeci">MongoNamespace getNamespace()</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00281">MongoCollection.java:281</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a6e19633ee91a386a95c793dd2f107789"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a6e19633ee91a386a95c793dd2f107789">org.dbcloud.mongodb.MongoCollection.find</a></div><div class="ttdeci">ArrayList&lt; Document &gt; find(Document filter)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00370">MongoCollection.java:370</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_aad9e90dcd78041d6690f44da4c90fcea"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#aad9e90dcd78041d6690f44da4c90fcea">org.dbcloud.mongodb.MongoCollection.find</a></div><div class="ttdeci">ArrayList&lt; Document &gt; find(Document filter, Document options, int skip, int limit)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00424">MongoCollection.java:424</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_acef4d2303697e996dc38affd79dad473"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#acef4d2303697e996dc38affd79dad473">org.dbcloud.mongodb.MongoCollection.MongoCollection</a></div><div class="ttdeci">MongoCollection(String db, String collection, String user, String password)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00242">MongoCollection.java:242</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a11fbbe695ab03ffa33bf49fd96082945"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a11fbbe695ab03ffa33bf49fd96082945">org.dbcloud.mongodb.MongoCollection.findOneAndReplace</a></div><div class="ttdeci">Document findOneAndReplace(Document filter, Document replacement, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00741">MongoCollection.java:741</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a77c09e10634134072f088158e3df7b7c"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a77c09e10634134072f088158e3df7b7c">org.dbcloud.mongodb.MongoCollection.deleteOne</a></div><div class="ttdeci">DeleteResult deleteOne(Document filter)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00535">MongoCollection.java:535</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_ab6d8b64ac1fe57e05e05dae723a98300"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#ab6d8b64ac1fe57e05e05dae723a98300">org.dbcloud.mongodb.MongoCollection.insertOne</a></div><div class="ttdeci">String insertOne(Document document, Document options)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00465">MongoCollection.java:465</a></div></div>
<div class="ttc" id="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection_html_a579e7b8ff5606d79a424fb9f8c782eed"><div class="ttname"><a href="classorg_1_1dbcloud_1_1mongodb_1_1_mongo_collection.html#a579e7b8ff5606d79a424fb9f8c782eed">org.dbcloud.mongodb.MongoCollection.findOneAndDelete</a></div><div class="ttdeci">Document findOneAndDelete(Document filter)</div><div class="ttdef"><b>Definition:</b> <a href="_mongo_collection_8java_source.html#l00688">MongoCollection.java:688</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_a3016bf19aa28451207b266e9b24d523.html">java</a></li><li class="navelem"><a class="el" href="dir_d898fe37fb7e20b388db820abf3aca5d.html">org</a></li><li class="navelem"><a class="el" href="dir_2cfdf83c0ba633d26e251fcc1db301cc.html">dbcloud</a></li><li class="navelem"><a class="el" href="dir_15afa3d9bf0ebe13848816c541d11f85.html">mongodb</a></li><li class="navelem"><b>MongoCollection.java</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
